<template>
    <div class="bod">
        <ul>
            <li @click="href">绑定银行卡<span>></span></li>
            <li @click="setthepassword">设置平台交易密码
                <span style=" right: 25px;" v-if="1==pwdType">
                    已设置</span >
                <span style=" right: 25px;" v-else>未设置</span >
                <span>></span>
            </li>
        </ul>
        <div v-if="1==type" @click="dianwofanhu">
            <button class="butll">
                    点我返回继续支付
                </button>         
        </div>
        <div v-else>
             <router-link :to="{name:'Mine'}">
                   <img src="../../../assets/personal/images/grzx.png" alt="" class="butll">
                </router-link>
        </div>
    </div>
</template>
<style scoped>
 .bod{
     width: 100%;
     height: 100%;
 }
 .bod ul li{
     width: 100%;
     height: 50px;
     background: #ffffff;
     line-height: 50px;
     text-align: left;
     padding-left: 15px;
     position: relative;
 }
 .bod ul li span{
     position: absolute;
     right:10px;
     color: #d0d0d0;
 }
 .bod ul li:nth-of-type(1){
     border-bottom: 1px solid #f2f2f2;
 }
 .butll{
     position: fixed;
     right: 50px;
     bottom: 50px;
   padding: 20px;
    border-radius: 5px;
 }
</style>
<script>
export default {
    data () {
        return {
           pwdType:'',
           type:this.$route.query.type,
           orderId:this.$route.query.orderId
        }
    },
    mounted(){
      this.statepwd()
    },
    methods:{
        dianwofanhu:function(){
               window.location = '/wap/pay_gxtscan1.html?orderid='+this.orderId+'&ordertype=1';
        },
        href:function(){
            this.$router.push({ name:'Card_package'})
        },
        setthepassword:function(){
            this.$router.push({ name:'setthepassword',query:{pwdType:this.pwdType}})
        },
        statepwd(){
            this.$http.get(this.APIURL_PREFIX+'/api/wap/accounts/sysPwd').then((response) => {
                if(response.data.msg=="该用户以设置交易密码"){
                    this.pwdType=1;
                }else{
                    this.pwdType=2;
                }
            }).catch(function(err){
                console.log(err)
            })
        }
    },
    
}
</script>
